import request from '@/utils/request'

// 获取评价列表
export function fetchList(params) {
  return request({
    url: '/comment/list',
    method: 'get',
    params: params
  })
}

// 添加商品评价
export function createComment(data) {
  return request({
    url: '/comment/create',
    method: 'post',
    data: data
  })
}

// 更新评价状态
export function updateStatus(id, params) {
  return request({
    url: '/comment/update/status/' + id,
    method: 'post',
    params: params
  })
}

// 删除评价
export function deleteComment(ids) {
  return request({
    url: '/comment/delete',
    method: 'post',
    data: ids
  })
}

// 获取评价详情
export function getComment(id) {
  return request({
    url: '/comment/' + id,
    method: 'get'
  })
} 